package com.lcj.bff.driver.feign;

import com.lcj.bff.driver.controller.form.*;
import com.lcj.common.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * Feign接口，调用具体的子系统
 * @Author : lcj
 * @create 2022/11/3 21:47
 */
@FeignClient(value = "aoch-dr")
public interface DriverServiceApi {

    @PostMapping("/driver/searchCanStartWork")
    public Result searchCanStartWork(SearchCanStartWorkForm form);

    /**
     * 司机注册Feign
     * @param form
     * @return
     */
    @PostMapping("/driver/registerNewDriver")
    public Result registerNewDriver(RegisterNewDriverForm form);

    /**
     * 更新司机信息Feign
     * @param form
     * @return
     */
    @PostMapping("/driver/updateDriverAuth")
    public Result updateDriverAuth(UpdateDriverAuthForm form);

    /**
     * 创建司机人脸模型Feign
     * @param form
     * @return
     */
    @PostMapping("/driver/createDriverFaceModel")
    public Result createDriverFaceModel(CreateDriverFaceModelForm form);

    /**
     * 登录
     * @param form
     * @return
     */
    @PostMapping("/driver/login")
    public Result login(LoginForm form);

    /**
     * 查询司机信息
     * @param form
     * @return
     */
    @PostMapping("/driver/searchDriverBaseInfo")
    public Result searchDriverBaseInfo(DriverIdForm form);

    /**
     * 查询司机设置
     * @param form
     * @return
     */
    @PostMapping("/settings/searchDriverSettings")
    public Result searchDriverSettings(DriverIdForm form);

    /**
     * 查询司机实名认证信息
     * @param form
     * @return
     */
    @PostMapping("/driver/searchDriverAuth")
    public Result searchDriverAuth(DriverIdForm form);

    @GetMapping("/driver/searchDriverIsRealAuth/{driverId}")
    public Result searchDriverIsAuth(@RequestParam("driverId")Long driverId);

    /**
     * 更新司机设置
     * @param form
     * @return
     */
    @PostMapping("/settings/updateDriverSettings")
    public Result updateDriverSettings(DriverSettingsForm form);

    /**
     * 司机钱包充值
     * @param form
     * @return
     */
    @PostMapping("/wallet/income/recharge")
    Result recharge(DriverRechargeForm form);

    /**
     * 查询钱包信息
     * @param form
     * @return
     */
    @PostMapping("/wallet/searchInfo")
    Map searchInfo(DriverWalletInfoForm form);

    /**
     * 更新司机电话
     * @param form
     * @return
     */
    @PostMapping("/driver/updatePhone")
    Result updatePhone(UpdatePhoneForm form);

    /**
     * 更新司机家
     * @param form
     * @return
     */
    @PostMapping("/driver/updateDriverHome")
    Result updateDriverHome(UpdateDriverHomeForm form);

    /**
     * 分页查询司机罚款
     * @param form
     * @return
     */
    @PostMapping("/fine/searchFineByPage")
    Result searchFineByPage(SearchFineForm form);

    /**
     * 判断能否支付罚款
     * @param form
     * @return
     */
    @PostMapping("/fine/canPay")
    Result canPay(CanPayForm form);

    /**
     * 支付罚款
     * @param form
     * @return
     */
    @PostMapping("/fine/payFine")
    Result payFine(PayFineForm form);

    /**
     * 校验司机人脸
     * @param form
     * @return
     */
    @PostMapping("/driver/vertificateDriverFace")
    Result vertificateDriverFace(CreateDriverFaceModelForm form);
}
